index.d.ts ➔ transformerUrls   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 1
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
dl 0
loc 1
rs 10
c 0
b 0
f 0
1
export interface Response {
2
    code: number;
3
    message: string;
4
    codeDesc: string;
5
    data: { count: number, task_id: string };
6
}
7
8
export = class Refresh {
9
    public host: string;
10
    public protocol: string;
11
    public constructor(public configs: {
12
        SecretId: string;
13
        SecretKey: string;
14
        Timestamp?: number;
15
        Nonce?: number;
16
        path?: string;
17
    });
18
19
    public purgeDirsCache(dirs: string | string[]): Promise<Response>
20
    public purgeUrlsCache(dirs: string | string[]): Promise<Response>
21
22
    public request(params: any): Promise<Response>
23
    public transformerUrls(urls: string | string[], type?: 'urls' | 'dirs'): Record<string, string>
24
    public buildRequestParams(urls: string | string[], type?: 'urls' | 'dirs', action?: 'RefreshCdnUrl' | 'RefreshCdnDir'): Record<string, string>
25
}
26